package ai.mspbots.service.task.entity;

import cn.hutool.core.util.IdUtil;
import lombok.Data;

import java.io.Serializable;

@Data
public class TaskEntity implements Serializable {

    private Long id;

    private String name;

    private String type = "task";

    public static TaskEntity of(Long id) {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setId(id);
        taskEntity.setName(IdUtil.randomUUID());
        return taskEntity;
    }
}
